import numpy as np

# 创建一个一维数组
arr = np.array([1, 2, 3, 4, 5])

# 打印数组
print("NumPy Array:", arr)

# 数组形状
print("Shape:", arr.shape)

# 数组类型
print("Type:", arr.dtype)

# 访问元素
print("Element at index 2:", arr[2])

# 数组运算
arr_squared = arr ** 2
print("Squared Array:", arr_squared)
